POV-Ray : Newsgroups : povray.binaries.animations : Endless Sunflower : Endless Sunflower Server Time
19 Jul 2024 15:27:18 EDT (-0400)
  Endless Sunflower  
From: Thies Heidecke
Date: 4 Sep 2002 08:22:39
Message: <3d75fb0f@news.povray.org>
Hi,

Just something that i made yesterday, which i found quite nice.
It's a bunch of ellipsoids on the xz-plane which are placed in
a simple loop. I hope you like it, and perhaps somebody can
make a real Sunflower with it =)

Greetings,
Thies

Here's the iteresting part of the code:
[begin code]
#declare phi = 360*(sqrt(5)-1)/2; // turn-angle increase(divine proportion!)
#declare N=10000;                 // nr of seeds
#declare Angle = 0;               // current angle
#declare dR = 0.05;               // Radius-increase from seed to seed
#declare R=dR;                    // current radius

#while(N>0)
 #local scaling = (4+15*max(0.0,ln(R)) );   // scaling of the seed
                                            //(formula is just an
approximation..)
 object {atom scale <scaling,3.5*scaling,scaling>
              translate R*z rotate Angle*y texture{a_tex}}
 #declare N=N-1;                            // next seed
 #declare Angle = Angle + phi;              // increase angle
 #declare R = R + dR;                       // increase Radius
#end
[end code]


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.